//
//  BVGuideCollectionViewCell.m
//  AFNetworking
//
//  Created by 崔晋 on 2019/10/26.
//

#import "BVGuideCollectionViewCell.h"

@interface BVGuideCollectionViewCell ()

@property (weak, nonatomic) IBOutlet UIImageView *imageV;
@property (weak, nonatomic) IBOutlet UILabel *nameL;
@property (weak, nonatomic) IBOutlet UIView *selectView;

@end

@implementation BVGuideCollectionViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    self.selectView.layer.cornerRadius = 6;
}


- (void)configWithModel:(NSDictionary *)dic {
    self.imageV.image = [UIImage bv_imageNamed:dic[@"image"] bundle:[BVBundle bundleWithClass:self.class name:BV_BUNDLE_HOME_SCENE_MODULE]];
    self.nameL.text = dic[@"name"];
    
    if ([dic[@"select"] boolValue]) {
        self.selectView.layer.borderWidth = 2;
        self.selectView.layer.borderColor = [UIColor colorFromHexString:@"dd6b4a"].CGColor;
    }else {
        self.selectView.layer.borderWidth = 0;
        self.selectView.layer.borderColor = [UIColor clearColor].CGColor;
    }
}

@end
